package Work4.Slay_the_Maze.Relics;

import Work4.Slay_the_Maze.Player.Player;

public class Cookie extends Relics{
	private int numValue=5;
	public int getNumValue() {
		return numValue;
	}
	public void setNumValue(int numValue) {
		this.numValue = numValue;
	}
	public Cookie() {
		super("曲奇",100);
	}
	public void PrintInfo() {
		System.out.println("曲奇：这个曲奇能让你在每次战斗休整时回复5点生命值");
	}
	public void useit(Player player) {
		player.setRestcantreat(player.getRestcantreat()+numValue);
	}
	public Cookie(Cookie other) {
        // 调用父类的构造函数，复制父类属性
        super(other.getName(),other.getValue());
        // 复制 Defense 类的特定属性
        this.numValue = other.numValue;
    }

    // 克隆方法
    @Override
    public Cookie clone() {
        return new Cookie(this);  // 使用拷贝构造函数
    }
}
